<?php
    include ("includes/config.php");    
    include ("includes/connection.php");
    include ("includes/database.php");
    
    $success = insertComment($_POST["name"], $_POST["email"], $_POST["comment"], $_POST["post_id"]);
    
    if ($success) {
        header("location:" . $CONFIG["base_url"] . "post.php?id=" . $_POST["post_id"] . "&comment_success=1");
    } 
    else {
?>
    Komentar Anda Gagal disimpan <a href="<?php echo $CONFIG["base_url"] . "post.php?id=" . $_POST["post_id"]; ?>">Kembali ke tulisan.</a>

<?php    
    }
?>
